\documentclass[UTF8, 11pt, draft]{ctexart}
\usepackage{geometry}
\geometry{a4paper,left=2cm,right=2cm,top=2cm,bottom=1cm}

\usepackage{tkz-euclide}
\begin{document}

% 标注一个角
\newcommand\labelangle[1]{
    \tkzFindAngle(#1) \tkzGetAngle{an}
    \tkzLabelAngle[pos=0.5](#1){$\an^\circ$}
}

% 绘制一个三角形
\newcommand{\drawtriangle}[1]{
    \tkzDefPoints{0/0/A, 4/0/B}
    \tkzDefTriangle[#1](A,B)  \tkzGetPoint{C}
    \tkzDrawPolygon[](A,B,C)
    \tkzCalcLength(A,B)  \tkzGetLength{ab}  \tkzLabelSegment[red](A,B){\ab}
    \tkzCalcLength(B,C)  \tkzGetLength{bc}  \tkzLabelSegment[red](B,C){\bc}
    \tkzCalcLength(A,C)  \tkzGetLength{ac}  \tkzLabelSegment[red](A,C){\ac}
    \tkzGetPointCoord(C){c}
    \pgfmathparse{greater(\cy,0)}
    \ifnum\pgfmathresult=1 % 点 C 在 AB 上方
        \labelangle{B,A,C}
        \labelangle{C,B,A}
        \labelangle{A,C,B}
        \tkzLabelPoints[below](A,B)
        \tkzLabelPoints[above](C)
    \else
        \labelangle{C,A,B}
        \labelangle{A,B,C}
        \labelangle{B,C,A}
        \tkzLabelPoints[above](A,B)
        \tkzLabelPoints[below](C)
    \fi
}

% 绘制一对三角形。（有、无 swap 参数各一个）
\newcommand{\drawpairs}[1]{
    \begin{tikzpicture}
        \draw (-2,0) node{#1};
        \begin{scope}
            \drawtriangle{#1}
        \end{scope}
        \begin{scope}[xshift=6cm]
            \drawtriangle{#1,swap}
        \end{scope}
    \end{tikzpicture} \par
}

\ExplSyntaxOn
\newcommand{\mytest}[1]{
    \int_step_inline:nnn {1}{\clist_count:n{#1}} {
        \drawpairs{\clist_item:nn{#1}{##1}}
    }
}
\ExplSyntaxOff

\drawpairs{two angles = 50 and 70}  % 这个参数有等号，比较特殊，单独写出来。

\mytest{
    equilateral, half, isosceles right,
    pythagore,  pythagoras, egyptian,
    school, gold,
    euclid, golden, sublime,
    cheops
}

\end{document}
